home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_oth / tasking / screenbi.def < prev    next >
Text File  |  1985-10-17  |  3KB  |  101 lines

  1. DEFINITION MODULE ScreenBIOS;
  2.  
  3. (*
  4.   This module will use screen coordinates as defined by Wirth  (0,0 is the
  5.   lower left hand corner of the page), FOR GRAPHICS ONLY. Text coordinates
  6.   are defined with 0,0 in the upper left hand corner of the screen.
  7.   Page refers to page number defined as 0 to 7 for lowResText, 0 to 3 for
  8.   hiResText, and 0 for graphics.
  9. *)
  10.  
  11.   EXPORT QUALIFIED
  12.     screenMode, area, settings, current,
  13.     SetScreenMode, SetCursorType, PutCursor, GetCursor, CursorOff, CursorOn,
  14.     RestoreScreen, ReadLightPenPosition, SelectActivePage,
  15.     ScrollUp, ScrollDown, ClearScreen, GetChar, PutCharAttr, PutChar,
  16.     SetPalette, WritePixel, ReadPixel, WriteChDTD, GetVideoState,
  17.     SetScrollMode;
  18.  
  19.   TYPE
  20.     screenMode = (mono40x25, col40x25, mono80x25, col80x25, col320x200,
  21.                   mono320x200, mono640x200, bw80x25);
  22.     area = RECORD
  23.       topMargin, bottomMargin, leftMargin, rightMargin: CARDINAL
  24.       (* in text coordinates *)
  25.     END;
  26.     settings = RECORD
  27.       mode: screenMode;
  28.       window: area;
  29.       page: CARDINAL;
  30.       numCols: CARDINAL;
  31.       maxGraphX, maxGraphY: INTEGER;
  32.       cursY, cursX: CARDINAL;
  33.       cursorStart, cursorEnd: CARDINAL;
  34.       attrib: CARDINAL;
  35.     END;
  36.  
  37.   VAR
  38.     current: settings;
  39.  
  40.   PROCEDURE SetScreenMode(newMode: screenMode);
  41.     (*
  42.        screenMode = (mono40x25, col40x25, mono80x25, col80x25, col320x200,
  43.                     mono320x200, mono640x200, bw80x25);
  44.     *)
  45.  
  46.   PROCEDURE SetCursorType(startScan, endScan : CARDINAL);
  47.  
  48.   PROCEDURE PutCursor(row, column, page : CARDINAL);
  49.  
  50.   PROCEDURE GetCursor(VAR row, column : CARDINAL;
  51.                                  page : CARDINAL;
  52.                                  VAR startScan, endScan : CARDINAL);
  53.     (* Returns both cursor position and cursor type. *)
  54.  
  55.   PROCEDURE CursorOn;
  56.  
  57.   PROCEDURE CursorOff;
  58.  
  59.   PROCEDURE RestoreScreen; (* Restore screen to initial entry params *)
  60.  
  61.   PROCEDURE ReadLightPenPosition(VAR x, y:CARDINAL);
  62.     (* Not implemented *)
  63.  
  64.   PROCEDURE SelectActivePage(page : CARDINAL);
  65.  
  66.   PROCEDURE ScrollUp(lines: CARDINAL; window : area; attr: CARDINAL);
  67.  
  68.   PROCEDURE ClearScreen(attr: CARDINAL);
  69.  
  70.   PROCEDURE ScrollDown(lines: CARDINAL; window : area; attr: CARDINAL);
  71.  
  72.   PROCEDURE GetChar(VAR ch : CHAR; VAR attr: CARDINAL; page: CARDINAL);
  73.     (* Reads the character at the current cursor position *)
  74.  
  75.   PROCEDURE PutCharAttr(ch : CHAR; attr: CARDINAL; count, page: CARDINAL);
  76.     (* Writes the character at the current cursor position with attribute
  77.        for text or colour in graphics, count times *)
  78.  
  79.   PROCEDURE PutChar(ch : CHAR; count, page: CARDINAL);
  80.     (* Writes the character at the current cursor position count times *)
  81.  
  82.   PROCEDURE SetPalette(ID, colour : CARDINAL);
  83.     (* medResGraphics ONLY *)
  84.     (* ID = 0 -> colour = background, ID = 1, corour = palette (0 or 1) *)
  85.  
  86.   PROCEDURE WritePixel(row, column, colour: CARDINAL);
  87.  
  88.   PROCEDURE ReadPixel(row, column: CARDINAL; VAR colour: CARDINAL);
  89.  
  90.   PROCEDURE WriteChDTD(ch: CHAR; colour: CARDINAL; page: CARDINAL);
  91.     (* Checks for bs, cr, lf, bel and executes as commands. *)
  92.  
  93.   PROCEDURE GetVideoState( VAR mode : screenMode; VAR col: CARDINAL;
  94.                            VAR page: CARDINAL);
  95.  
  96.   PROCEDURE SetScrollMode(mode: CARDINAL);
  97.     (* FOR Heath MS-DOS BIOS ONLY
  98.        0 = normal software, 1 = jump scroll (hardware), 2 = smooth *)
  99.  
  100.   END ScreenBIOS.
  101.